3.7.33 \(\int \frac {x^2 (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=166 \[ \frac {x^2 (a+b x) (A b-a B)}{2 b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {a^2 (a+b x) (A b-a B) \log (a+b x)}{b^4 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a x (a+b x) (A b-a B)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^3 (a+b x)}{3 b \sqrt {a^2+2 a b x+b^2 x^2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 166, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {770, 77} \begin {gather*} \frac {x^2 (a+b x) (A b-a B)}{2 b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a x (a+b x) (A b-a B)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {a^2 (a+b x) (A b-a B) \log (a+b x)}{b^4 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^3 (a+b x)}{3 b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

-((a*(A*b - a*B)*x*(a + b*x))/(b^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2])) + ((A*b - a*B)*x^2*(a + b*x))/(2*b^2*Sqrt[a
^2 + 2*a*b*x + b^2*x^2]) + (B*x^3*(a + b*x))/(3*b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (a^2*(A*b - a*B)*(a + b*x)*
Log[a + b*x])/(b^4*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {x^2 (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {x^2 (A+B x)}{a b+b^2 x} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {a (-A b+a B)}{b^4}+\frac {(A b-a B) x}{b^3}+\frac {B x^2}{b^2}-\frac {a^2 (-A b+a B)}{b^4 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=-\frac {a (A b-a B) x (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {(A b-a B) x^2 (a+b x)}{2 b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^3 (a+b x)}{3 b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {a^2 (A b-a B) (a+b x) \log (a+b x)}{b^4 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 77, normalized size = 0.46 \begin {gather*} \frac {(a+b x) \left (b x \left (6 a^2 B-3 a b (2 A+B x)+b^2 x (3 A+2 B x)\right )+6 a^2 (A b-a B) \log (a+b x)\right )}{6 b^4 \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

((a + b*x)*(b*x*(6*a^2*B - 3*a*b*(2*A + B*x) + b^2*x*(3*A + 2*B*x)) + 6*a^2*(A*b - a*B)*Log[a + b*x]))/(6*b^4*
Sqrt[(a + b*x)^2])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.62, size = 279, normalized size = 1.68 \begin {gather*} \frac {-6 a^2 B x+6 a A b x+3 a b B x^2-3 A b^2 x^2-2 b^2 B x^3}{12 \left (b^2\right )^{3/2}}+\frac {\sqrt {a^2+2 a b x+b^2 x^2} \left (11 a^2 B-9 a A b-5 a b B x+3 A b^2 x+2 b^2 B x^2\right )}{12 b^4}+\frac {\left (a^3 \sqrt {b^2} B+a^3 b B-a^2 A b^2-a^2 A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}-a-\sqrt {b^2} x\right )}{2 b^5}+\frac {\left (a^3 \sqrt {b^2} B+a^3 (-b) B+a^2 A b^2-a^2 A b \sqrt {b^2}\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}+a-\sqrt {b^2} x\right )}{2 b^5} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(x^2*(A + B*x))/Sqrt[a^2 + 2*a*b*x + b^2*x^2],x]

[Out]

(Sqrt[a^2 + 2*a*b*x + b^2*x^2]*(-9*a*A*b + 11*a^2*B + 3*A*b^2*x - 5*a*b*B*x + 2*b^2*B*x^2))/(12*b^4) + (6*a*A*
b*x - 6*a^2*B*x - 3*A*b^2*x^2 + 3*a*b*B*x^2 - 2*b^2*B*x^3)/(12*(b^2)^(3/2)) + ((-(a^2*A*b^2) - a^2*A*b*Sqrt[b^
2] + a^3*b*B + a^3*Sqrt[b^2]*B)*Log[-a - Sqrt[b^2]*x + Sqrt[a^2 + 2*a*b*x + b^2*x^2]])/(2*b^5) + ((a^2*A*b^2 -
 a^2*A*b*Sqrt[b^2] - a^3*b*B + a^3*Sqrt[b^2]*B)*Log[a - Sqrt[b^2]*x + Sqrt[a^2 + 2*a*b*x + b^2*x^2]])/(2*b^5)

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 71, normalized size = 0.43 \begin {gather*} \frac {2 \, B b^{3} x^{3} - 3 \, {\left (B a b^{2} - A b^{3}\right )} x^{2} + 6 \, {\left (B a^{2} b - A a b^{2}\right )} x - 6 \, {\left (B a^{3} - A a^{2} b\right )} \log \left (b x + a\right )}{6 \, b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

1/6*(2*B*b^3*x^3 - 3*(B*a*b^2 - A*b^3)*x^2 + 6*(B*a^2*b - A*a*b^2)*x - 6*(B*a^3 - A*a^2*b)*log(b*x + a))/b^4

________________________________________________________________________________________

giac [A]  time = 0.15, size = 113, normalized size = 0.68 \begin {gather*} \frac {2 \, B b^{2} x^{3} \mathrm {sgn}\left (b x + a\right ) - 3 \, B a b x^{2} \mathrm {sgn}\left (b x + a\right ) + 3 \, A b^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + 6 \, B a^{2} x \mathrm {sgn}\left (b x + a\right ) - 6 \, A a b x \mathrm {sgn}\left (b x + a\right )}{6 \, b^{3}} - \frac {{\left (B a^{3} \mathrm {sgn}\left (b x + a\right ) - A a^{2} b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

1/6*(2*B*b^2*x^3*sgn(b*x + a) - 3*B*a*b*x^2*sgn(b*x + a) + 3*A*b^2*x^2*sgn(b*x + a) + 6*B*a^2*x*sgn(b*x + a) -
 6*A*a*b*x*sgn(b*x + a))/b^3 - (B*a^3*sgn(b*x + a) - A*a^2*b*sgn(b*x + a))*log(abs(b*x + a))/b^4

________________________________________________________________________________________

maple [A]  time = 0.05, size = 90, normalized size = 0.54 \begin {gather*} \frac {\left (b x +a \right ) \left (2 B \,b^{3} x^{3}+3 A \,b^{3} x^{2}-3 B a \,b^{2} x^{2}+6 A \,a^{2} b \ln \left (b x +a \right )-6 A a \,b^{2} x -6 B \,a^{3} \ln \left (b x +a \right )+6 B \,a^{2} b x \right )}{6 \sqrt {\left (b x +a \right )^{2}}\, b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(B*x+A)/((b*x+a)^2)^(1/2),x)

[Out]

1/6*(b*x+a)*(2*b^3*B*x^3+3*A*x^2*b^3-3*B*x^2*a*b^2+6*A*ln(b*x+a)*a^2*b-6*A*a*b^2*x-6*B*ln(b*x+a)*a^3+6*B*a^2*b
*x)/((b*x+a)^2)^(1/2)/b^4

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 125, normalized size = 0.75 \begin {gather*} -\frac {5 \, B a x^{2}}{6 \, b^{2}} + \frac {A x^{2}}{2 \, b} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B x^{2}}{3 \, b^{2}} + \frac {5 \, B a^{2} x}{3 \, b^{3}} - \frac {A a x}{b^{2}} - \frac {B a^{3} \log \left (x + \frac {a}{b}\right )}{b^{4}} + \frac {A a^{2} \log \left (x + \frac {a}{b}\right )}{b^{3}} - \frac {2 \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a^{2}}{3 \, b^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x+A)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

-5/6*B*a*x^2/b^2 + 1/2*A*x^2/b + 1/3*sqrt(b^2*x^2 + 2*a*b*x + a^2)*B*x^2/b^2 + 5/3*B*a^2*x/b^3 - A*a*x/b^2 - B
*a^3*log(x + a/b)/b^4 + A*a^2*log(x + a/b)/b^3 - 2/3*sqrt(b^2*x^2 + 2*a*b*x + a^2)*B*a^2/b^4

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2\,\left (A+B\,x\right )}{\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(A + B*x))/((a + b*x)^2)^(1/2),x)

[Out]

int((x^2*(A + B*x))/((a + b*x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [A]  time = 0.24, size = 61, normalized size = 0.37 \begin {gather*} \frac {B x^{3}}{3 b} - \frac {a^{2} \left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{4}} + x^{2} \left (\frac {A}{2 b} - \frac {B a}{2 b^{2}}\right ) + x \left (- \frac {A a}{b^{2}} + \frac {B a^{2}}{b^{3}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(B*x+A)/((b*x+a)**2)**(1/2),x)

[Out]

B*x**3/(3*b) - a**2*(-A*b + B*a)*log(a + b*x)/b**4 + x**2*(A/(2*b) - B*a/(2*b**2)) + x*(-A*a/b**2 + B*a**2/b**
3)

________________________________________________________________________________________